﻿<%@ Page Language="C#" MasterPageFile="~/Shared/FormPage.Master" AutoEventWireup="true" CodeBehind="NoticeSend.aspx.cs" Inherits="Runda.CMS.Portal.NoticeManage.NoticeSend" StylesheetTheme="GlobleTheme" validateRequest="false" %>

<%@ Register assembly="RadComboBox.Net2" namespace="Telerik.WebControls" tagprefix="rad" %>
<%@ Register assembly="RadTreeView.Net2" namespace="Telerik.WebControls" tagprefix="rad" %> 
<%@ Register Assembly="RadAjax.Net2" Namespace="Telerik.WebControls" TagPrefix="rad" %>

<asp:Content runat="server" ContentPlaceHolderID="head" ID="myHeader">
    <link href="../Content/Form/form.css" rel="Stylesheet" type="text/css" />
    <script language="javascript" src="../Content/settings.aspx"></script>
    <script language="javascript" src="../Content/Detail.js"></script>
    <script type="text/javascript" src="../Content/DateTime/date.js"></script>
    <script language="javascript" src="../Content/settings.aspx"></script>
    <script type="text/javascript" src="../Content/DateTime/time.js"></script>
    <script language="javascript" src="../Content/util.js"></script>
    <script src="../Content/global.js" type="text/javascript"></script>
    
<script language="javascript" type="text/javascript">

    function BeforeClientToggleHandle(node) {
        document.getElementById('<%=hidCanClosed.ClientID %>').value = '1';
    }

    function OnClientDropDownClosingHandle(combobox) {
        if (document.getElementById('<%=hidCanClosed.ClientID %>').value == '1')
        {
            document.getElementById('<%=hidCanClosed.ClientID %>').value = '0';
            return false;
        }
        return true;
    }
    function BeforeClientClickHandle(node) {
        if (node.Value == '') {
            alert("请选择");
            return;
        }
        node.selected = true;
        document.getElementById('<%=hidSelected.ClientID %>').value = node.Value;
        <%= RadComboBox1.ClientID %>.SetText(node.Text);
        document.getElementById('<%=hidCanClosed.ClientID %>').value = '0';

        document.getElementById('<%=btnRefersh.ClientID %>').click();
        return false;
    }
    function setContent() {
            document.getElementById('<%=hiddenContent.ClientID %>').value = document.getElementById('<%=NoticeContent.ClientID %>').innerHTML;
            return true;
    }

</script>
</asp:Content>
<asp:Content runat="server" ContentPlaceHolderID="cphFormArea" ID="Content1">
    <rad:RadAjaxManager runat="server" ID="radajaxmanager1">
        <AjaxSettings>
            <rad:AjaxSetting AjaxControlID="btnRefersh">
                <UpdatedControls>
                    <rad:AjaxUpdatedControl ControlID="employeeChoose" LoadingPanelID="AjaxLoadingPanel"/>
                </UpdatedControls>
            </rad:AjaxSetting>
            <rad:AjaxSetting AjaxControlID="btnAdd">
                <UpdatedControls> 
                    <rad:AjaxUpdatedControl ControlID="employees" LoadingPanelID="AjaxLoadingPanel"/>
                </UpdatedControls>
            </rad:AjaxSetting>
            <rad:AjaxSetting AjaxControlID="btnRemove">
                <UpdatedControls> 
                    <rad:AjaxUpdatedControl ControlID="employees" LoadingPanelID="AjaxLoadingPanel"/>
                </UpdatedControls>
            </rad:AjaxSetting>
        </AjaxSettings>
    </rad:RadAjaxManager>
       <rad:AjaxLoadingPanel runat="server" ID="AjaxLoadingPanel">
        <img src="../Images/Loading.gif" />数据载入......
    </rad:AjaxLoadingPanel>
    <table class="mnubar" cellspacing="0" cellpadding="0">
        <tbody>
            <tr>
                <td width="9">
                    <img hspace="3" src="../Content/Menu/mnu_vSpacer.gif">
                </td>
                <td class="icMenu" nowrap>
                    <asp:LinkButton ID="lnkbtnSave" runat="server" OnClientClick="setContent();" OnClick="lnkbtnSave_Click" ><span class="menu" title="发送"><img class="mnuBtn" src="../Content/Menu/Save_16_blue.gif"><span class="mnuBtn">发送</span></span></asp:LinkButton>
                    <asp:LinkButton ID="lnkbtnSaveAndClose" runat="server" OnClientClick="setContent();"  OnClick="lnkbtnSaveAndClose_Click"
                       ><span class="menu" title="发送&amp;关闭" onclick="window.execScript(this.action);"><img class="mnuBtn" src="../Content/Menu/SaveClose_16_blue.gif"><span class="mnuBtn">发送&amp;关闭</span></span></asp:LinkButton>
                    <asp:LinkButton ID="lnkbtnSaveAndNew" runat="server" OnClientClick="setContent();"  OnClick="lnkbtnSaveAndNew_Click"
                     ><span class="menu" title="发送&amp;新增"><img class="mnuBtn" src="../Content/Menu/SaveNew_16_blue.gif"><span class="mnuBtn">发送&amp;新增</span></span></asp:LinkButton>
                    <img src="../Content/Menu/separator.gif">
                    <span class="menu" title="关闭" onclick="window.close();">
                        <img class="mnuBtn" src="../Content/Menu/Close_16_blue.gif"><span class="mnuBtn">关闭</span></span>
                </td>
            </tr>
        </tbody>
    </table>
    <div style="border-bottom: #c2c2bf 1px solid; border-top: #969693 1px solid">
    </div>
    <div id="areaForm" class="area">
        <table cellspacing="0" cellpadding="0" width="100%" height="100%">
            <tbody>               
                <tr>
                    <td valign="top">
                        <div style="display: inline" id="appForm_tab0" class="tab">
                            <table style="table-layout: fixed" id="Section1" cellspacing="0" cellpadding="3"
                                width="100%">
                                <colgroup>
                                    <col width="60">
                                    <col>
                                    <tbody>
                                        <tr>
                                            <td class="req">
                                                接收时间
                                            </td>
                                            <td>
                                                <asp:TextBox ID="NoticeTime" runat="server" CssClass="input"></asp:TextBox>
                                            </td>
                                            <td style="padding-left: 4px;">
                                                <img title="选择日期" class="dtm" style="cursor: hand;" src="/Images/btn_off_cal.gif"
                                                    complete="complete" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="vertical-align: top">
                                                内容
                                            </td>
                                            <td>
                                                 <div style="border:solid 1px blue;width:100%;height:300;" contentEditable="true" id="NoticeContent" runat="server"></div>                                           
                                            </td>
                                            <td>
                                            </td>
                                        </tr>
                                    </tbody>
                            </table>
                        </div>
                    </td>
                </tr>
              
            </tbody>
        </table>
        <table  cellspacing="0" cellpadding="0" width="50%" height="100%">
            <tr>
                <td> 
                    <rad:RadComboBox ID="RadComboBox1" runat="server" Width="178px" SkinsPath="~/RadControls/ComboBox/Skins" OnClientDropDownClosing="OnClientDropDownClosingHandle">
                        <ItemTemplate>                                                    
                            <rad:RadTreeView ID="RadTreeView1" runat="server" BeforeClientToggle="BeforeClientToggleHandle" BeforeClientClick="BeforeClientClickHandle" Height="200px">
                            </rad:RadTreeView>                                                    
                        </ItemTemplate>
                        <Items>
                            <rad:RadComboBoxItem ID="radcmbItem" runat="server" />
                        </Items>
                    </rad:RadComboBox>
                    备选人员：<br /> 
                            <asp:ListBox ID="employeeChoose" runat="server" SelectionMode="Multiple" Height="400px"
                                Width="250px"></asp:ListBox>
                      
                </td>
                <td>
                    <asp:Button ID="btnAdd" runat="server" Text=">>>" OnClick="btnAdd_Click"></asp:Button>
                    <br />
                    <asp:Button ID="btnRemove" runat="server" Text="<<<" OnClick="btnRemove_Click"></asp:Button>
                </td>
                <td>
                    选择人员：<br /> 
                            <asp:ListBox ID="employees" runat="server" SelectionMode="Multiple" Height="400px"
                                Width="250px"></asp:ListBox>                         
                </td>
            </tr>             
        </table>
    </div>
    <asp:HiddenField ID="hidCanClosed" runat="server" />
    <asp:HiddenField ID="hidSelected" runat="server" />
    <asp:TextBox runat="server" ID="hiddenContent" style="display:none"></asp:TextBox>
    <asp:Button ID="btnRefersh" runat="server" Text="刷新" onclick="btnRefersh_Click" style="display:none" />
</asp:Content>
